import {action, Service} from "adajs";
import NoticeList from "../../../../controls/lists/lgbbirthtable";

class LodgeService extends Service {
    defaultData() {
        return {
            list: {
                url: "/api/admin/lgb/oldperson/birth/list",
                type: NoticeList,
                parameter: {
                    lbDm: 'srtx',
                    zt: ''
                }
            }
        }
    }

    onupdate(current, data) {
        Object.assign(current, data);
    }

    @action('search')
    search(current, keyword) {
        current.list.parameter.zt = keyword;
    }
}

export default LodgeService;